package club.kingyin.commons.clients;

import club.kingyin.commons.entity.photo.PhotoResponse;
import club.kingyin.commons.entity.photo.Results;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient( name = "ky-blog-photo", url = "https://api.unsplash.com/")
public interface PhotoClient {

    @GetMapping("/photos/random")
    String random(@RequestParam("client_id") String clientId, @RequestParam("count") int count);

    @GetMapping("/search/photos")
    String query(@RequestParam("client_id") String clientId,@RequestParam("query") String query);
}
